/****************************************************
 * Description: ServiceImpl for 课程
 * Copyright:   Copyright (c) 2014
 * Company:     beiwaionline
 * @author      bfsu
 * @version     1.0
 * @see
	HISTORY
    *  2014-01-10 bfsu Create File
**************************************************/

package com.bfsuol.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bfsuol.bfsuolframework.security.dao.BaseUser;
import com.bfsuol.bfsuolframework.security.dao.BaseUserMapper;
import com.bfsuol.common.dao.LoginMapper;
import com.bfsuol.common.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LoginServiceImpl extends ServiceImpl<LoginMapper,BaseUser> implements LoginService {

    @Autowired
    private BaseUserMapper baseUserMapper;


	public BaseUser getBaseUserByLogin(String loginName,String password){
    	//return loginDAO.getBaseUserByLogin(loginName, password);
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("login_name",loginName);
        queryWrapper.eq("password",password);
        return baseUserMapper.selectOne(queryWrapper);
    }
/*
 * (non-Javadoc)
 * @see com.bfsuol.lms2014.common.service.LoginService#getBaseUserByEmail(java.lang.String, java.lang.String)
 */
	public BaseUser getBaseUserByEmail(String loginName, String email) {
		//return loginMapper.getBaseUserByEmail(loginName,email);
	    return null;
    }

}